import React from 'react' ;
import { Row,Col } from 'antd' ;
import $ from "jquery";
import home_news from '../../../static/Home/home_news.jpg' ;
import news_zhengcezixun from '../../../static/Home/news_zhengcezixun.jpg' ;
import news_gongshigonggao from '../../../static/Home/news_gongshigonggao.jpg' ;
import new_yuanqufuwu from '../../../static/Home/new_yuanqufuwu.jpg' ;
import news_zixunjieda from '../../../static/Home/news_zixunjieda.jpg' ;


import news_wangshangshenbao from '../../../static/Home/news_wangshangshenbao.jpg' ;

let news_pic_arr = [news_zhengcezixun,news_gongshigonggao,new_yuanqufuwu,news_zixunjieda,news_wangshangshenbao] ;

class Home_news extends React.Component{
    constructor(props){
        super(props) ;
        this.state = {
            home_news : news_pic_arr[0] ,
        }
    }
    homeNewsChange(value,e){
        $(".home_news_menu span").removeClass('activeSpan') ;
        $(e.target).addClass('activeSpan') ;
        let pic = news_pic_arr[value] ;
        this.setState({
            home_news : pic,
        })
    }
    render(){
        return(
            <Row gutter={24}>
                <Col span={3} className={`home_news_menu`}>
                    <span onClick={this.homeNewsChange.bind(this,0)} className={`activeSpan`}>政策咨询</span>
                    <span onClick={this.homeNewsChange.bind(this,1)}>公示公告</span>
                    <span onClick={this.homeNewsChange.bind(this,2)}>园区服务</span>
                    <span onClick={this.homeNewsChange.bind(this,3)}>咨询解答</span>
                    <span onClick={this.homeNewsChange.bind(this,4)}>网上申报</span>
                </Col>
                <Col span={14}>
                    <img src={this.state.home_news} style={{ marginTop:'35px' }}/>
                </Col>
                <Col span={7}>
                    <img src={home_news} style={{ marginTop:'10px' }}/>
                </Col>
            </Row>        )
    }
}

export default Home_news ;